#ifdef _WIN32
#define getc_unlocked(stdin) getc(stdin)
#endif
#include <algorithm>
#include <iostream>
#include <iomanip>
#include <sstream>
#include <string>
#include <list>
#include <bitset>
#include <vector>
#include <stack>
#include <queue>
#include <deque>
#include <set>
#include <map>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cctype>
#include <cmath>
#include <cassert>
#include <ctime>
#include <numeric>
#include <functional>
#include <valarray>
#include <complex>
using namespace std;

const int dx[]={0,-1,0,1,-1,1, 1,-1};
const int dy[]={1,0,-1,0, 1,1,-1,-1};
const double eps=1e-8;

typedef long long LL;
typedef unsigned long long uLL;
typedef pair<int,int> pii;
typedef vector<int> vi;
typedef vector<vi> vgraph;
typedef vector<pii> vpii;
typedef vector<LL> vLL;
typedef vector<string> vs;

#define sz(a) a.size()
#define fori(i,a,b) for(int i(a),_b(b);i<=_b;++i)
#define ford(i,a,b) for(int i(a),_b(b);i>=_b;--i)
#define forn(i,n) fori(i,0,n-1)
#define fora(i,a) forn(i,sz(a))
#define fore(it,c) for(typeof((c).begin()) it=(c).begin();it!=(c).end();++it)
#define all(a) a.begin(),a.end()
#define mp make_pair
#define pb push_back
#define fi first
#define se second
#define clear0(a) memset(a,0,sizeof(a))
#define clearm1(a) memset(a,-1,sizeof(a))
#define maximum(a) (*max_element(all(a)))
#define minimum(a) (*min_element(all(a)))
#define findx(a,x) (find(all(a),x)-a.begin())
#define two(X) (1LL<<(X))
#define contain(S,X) ((S)&two(X))
#define setbit(S,X) ((S)|=two(X))
#define clearbit(S,X) ((S)&=~two(X))
#define togglebit(S,X) ((S)^=two(X))
#define sqr(a) ((a)*(a))
#define fin "input.inp"
#define fout "output.out"
#define nmax 1000001
#define mmax 100
#define kmax 10
#define modulo 1000000007
#define maxc 999999999

const int base=10000;
const int lengthbase=4;
const int maxarray=100;
struct bignum
{
    int num[maxarray],length;
    bool positive;
    bignum() {positive=length=1; clear0(num);}
};
bignum Equal(LL a)
{
    bignum b;
    if (a<0) {b.positive=0; a=-a;}
    if (a!=0) b.length--;
    while (a>0)
    {
        b.num[b.length++]=a%base;
        a/=base;
    }
    return b;
}
void cutdownzero(bignum &c) // for every a and b
{
    while (c.length>1 && c.num[c.length-1]==0) c.length--;
}
int compbig_positive(bignum a,bignum b) // -1:a>b 0:a=b 1:a<b; for a>0 && b>0
{
    if (a.length!=b.length)
        if (a.length<b.length) return 1; else return -1;
    ford(i,a.length-1,0)
        if (a.num[i]!=b.num[i])
            if (a.num[i]<b.num[i]) return 1; else return -1;
    return 0;
}
int compbignum(bignum a,bignum b) // -1:a>b 0:a=b 1:a<b; for every a and b
{
    if (a.positive!=b.positive)
    {
        if (a.positive) return -1;
        return 1;
    }
    int ans=compbig_positive(a,b);
    if (!a.positive) ans=-ans;
    return ans;
}
bignum add(bignum a,bignum b) // just use for a>0 && b>0
{
    bignum c;
    c.length=max(a.length,b.length);
    int mem=0;
    forn(i,c.length)
    {
        int sum=a.num[i]+b.num[i]+mem;
        if (sum>=base)
        {
            mem=sum/base;
            sum%=base;
        } else mem=0;
        c.num[i]=sum;
    }
    if (mem>0) c.num[c.length++]=mem;
    return c;
}
bignum sub(bignum a,bignum b) // just use for a>0 && b>0
{
    bignum c;
    if (compbig_positive(a,b)==1)
    {
        c.positive=0;
        swap(a,b);
    }
    c.length=a.length;
    int mem=0;
    forn(i,c.length)
    {
        int subtract=a.num[i]-b.num[i]+mem;
        if (subtract<0)
        {
            mem=-1;
            subtract+=base;
        } else mem=0;
        c.num[i]=subtract;
    }
    cutdownzero(c);
    return c;
}
bignum mulbase(bignum a,int times) // every a can be used
{
    a.length+=times;
    ford(i,a.length-1,times)
        a.num[i]=a.num[i-times];
    forn(i,times) a.num[i]=0;
    return a;
}
bignum mul(bignum a,bignum b) // every a and b can be used
{
    bignum sum;
    forn(i,b.length)
    {
        bignum c;
        c.length=a.length;
        int mem=0;
        forn(j,a.length)
        {
            int multi=a.num[j]*b.num[i]+mem;
            if (multi>=base)
            {
                mem=multi/base;
                multi%=base;
            } else mem=0;
            c.num[j]=multi;
        }
        if (mem>0) c=add(mulbase(Equal(mem),c.length),c);
        c=mulbase(c,i);
        cutdownzero(c);
        sum=add(sum,c);
    }
    if (compbignum(sum,Equal(0))!=0)
        sum.positive=!(a.positive^b.positive);
    else sum.positive=1;
    return sum;
}
void printadd0(int a)
{
    string c;
    while (a>0)
    {
        int x=a%10;
        a/=10;
        c=char(x+'0')+c;
    }
    while (sz(c)<lengthbase) c='0'+c;
    cout << c;
}
void printbignum(bignum a)
{
    if (!a.positive) cout << '-';
    cout<<a.num[a.length-1];
    ford(i,a.length-2,0)
        printadd0(a.num[i]);
    cout<<'\n';
}
int main()
{
	ios_base::sync_with_stdio(false);
	cin.tie(NULL);
	#ifndef ONLINE_JUDGE
		freopen(fin,"r",stdin);
		//freopen(fout,"w", stdout);
	#endif
	bignum a,b,c;
    a=Equal(123456);
    b=Equal(6543211);
    c=add(a,b);
    printbignum(a);
    printbignum(b);
    printbignum(c);
	return 0;
}


